package com.abc.xxx.config;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;


@Data
@Component
@ConfigurationProperties(prefix = "settings")
public class Settings {

    public String jwtSecret = "secret";

    public long jwtExpire = 1800;

    public long jwtAutoRefreshInAdvance = 900;

    public List<String> jwtWhiteList = new ArrayList<>();

    public Set<String> superRoles = new HashSet<>();

    public TcpApi tcpApi;

    @Getter
    @Setter
    public static class TcpApi{
        private String host;
        private int port;
    }


}
